import React, {Component} from 'react';
import connect from "../hoc/connect";
import {addNumber} from "../store/modules/counter";
class About extends Component {
    render() {
        const {counter} = this.props
        return (
            <div>
                <h2>about counter : {counter}</h2>
            </div>
        );
    }
}
const mapStateToProps = (state)=>({
    counter:state.counter.counter
})

const mapDispatchToProps = (dispatch)=>({
    addNum(num){
        dispatch(addNumber(num))
    }
})
export default connect(mapStateToProps,mapDispatchToProps)(About);
